<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>
<body>
  <% if(user){ %>
      <nav>
        <h3><%=user.loginName%>登录成功</h3>
        <a href="/user/loginout">退出</a>
      </nav>
      <form action="/user/update_pwd" method="post">
        <input type="text" name="loginName" placeholder="输入想要修改的账户">
        <input type="text" name="newPassword" placeholder="输入新密码">
        <input type="submit" value="确认修改">
      </form>
  <% }%>
<% else{ %>
  <form action="/user/login" mthod="post">
     <input type="text" name="loginName">
     <input type="password" name="loginPassword">
     <input type="password" name="confirm">
     <%= firstNum %> + <%= secondNum %> = <input type="text" name="vCode">
     <input type="submit" value="登录">
  </form>

    <% } %>
    <form action="/user/reg" method="post">
      <input type="text" name="loginName">
      <input type="password" name="loginPassword">
      <img src="/users/Vimg" alt="注册验证码">
      <input type="text" name="Vimg">
      <input type="submit" value="注册">
    </form>

</body>
</html>
